'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller, middleware } = app;
  router.get('/', controller.home.index);
  // router.get('/user', controller.home.info);
  // router.get('/select', controller.home.select);
  router.post('/user/login', controller.user.login);
  router.post('/user/create', middleware.jwt(), controller.user.create);
  router.post('/user/update', middleware.jwt(), controller.user.update);
  router.post('/user/delete', middleware.jwt(), controller.user.delete);
  router.post('/user/select', middleware.jwt(), controller.user.select);

  router.post('/school/detail', middleware.jwt(), controller.school.detail);
  router.post('/school/create', middleware.jwt(), controller.school.create);
  router.post('/school/update', middleware.jwt(), controller.school.update);
  router.post('/school/delete', middleware.jwt(), controller.school.delete);
  router.post('/school/select', middleware.jwt(), controller.school.select);

  router.post('/resume/detail', middleware.jwt(), controller.resume.detail);
  router.post('/resume/create', middleware.jwt(), controller.resume.create);
  router.post('/resume/update', middleware.jwt(), controller.resume.update);
  router.post('/resume/delete', middleware.jwt(), controller.resume.delete);
  router.post('/resume/select', middleware.jwt(), controller.resume.select);

  router.post('/project/detail', middleware.jwt(), controller.project.detail);
  router.post('/project/create', middleware.jwt(), controller.project.create);
  router.post('/project/update', middleware.jwt(), controller.project.update);
  router.post('/project/delete', middleware.jwt(), controller.project.delete);
  router.post('/project/select', middleware.jwt(), controller.project.select);

  router.post('/company/detail', middleware.jwt(), controller.company.detail);
  router.post('/company/create', middleware.jwt(), controller.company.create);
  router.post('/company/update', middleware.jwt(), controller.company.update);
  router.post('/company/delete', middleware.jwt(), controller.company.delete);
  router.post('/company/select', middleware.jwt(), controller.company.select);
};
